<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">

	<p:dialog id="operatorProfileDialogId" header="Chi tiết operatorProfile" widgetVar="operatorProfileDialog"
		showEffect="fade" hideEffect="fade" resizable="true" modal="true" appendToBody="true" maximizable="true">
		<h:form id="operatorProfileDetailFormId">
			<p:tabView id="tabView">
				<p:tab title="Thông tin chung">
					<h:panelGrid id="operatorProfilePanelGridId" columns="2" cellpadding="4">

						<f:facet name="header">
							<p:messages autoUpdate="true" />
						</f:facet>

						<h:outputText value="Mã số" style="font-weight:bold" />
						<p:inputText value="#{operatorProfileView.editedEntity.code}" />

						<h:outputText value="Tên" style="font-weight:bold" />
						<p:inputText value="#{operatorProfileView.editedEntity.name}" />

						<h:outputText value="Chi nhánh" style="font-weight:bold" />
						<p:selectOneMenu value="#{operatorProfileView.selectedChiNhanhId}">
							<f:selectItem itemLabel="" itemValue="" />
							<f:selectItems var="cn" value="#{operatorProfileView.chiNhanhs}" itemLabel="#{cn.name}" itemValue="#{cn.id}" />
						</p:selectOneMenu>

						<p:outputLabel value="Active" style="font-weight:bold" />
						<h:selectBooleanCheckbox value="#{operatorProfileView.editedEntity.active}" />

						<f:facet name="footer">
						</f:facet>
					</h:panelGrid>
				</p:tab>
				<p:tab title="Bảng phân quyền">
					<ui:include src="privilegeTable.xhtml"></ui:include>
				</p:tab>
			</p:tabView>
			<p:commandButton icon="ui-icon-disk" value="Save" action="#{operatorProfileView.saveOrUpdate}" process="@form"
				update="@form :operatorProfileListFormId:operatorProfileDataTableId"
				oncomplete="if (!args.validationFailed) operatorProfileDialog.hide()">
			</p:commandButton>
			<p:commandButton icon="ui-icon-cancel" value="Cancel" immediate="true" onclick="operatorProfileDialog.hide()" />
		</h:form>
	</p:dialog>

</ui:composition>